package org.example.composite;

/**
 * @author wangbin
 * @date 2024/4/18
 * @vesion 1.0
 */
public abstract class OrganizationComponent {
    private String name;
    private String dec;

    protected void add(OrganizationComponent organizationComponent){
        throw new UnsupportedOperationException();
    }

    protected void remove(OrganizationComponent organizationComponent){
        throw new UnsupportedOperationException();
    }

    public OrganizationComponent(String name, String dec) {
        this.name = name;
        this.dec = dec;
    }

    public String getName() {
        return name;
    }

    public String getDec() {
        return dec;
    }

    protected abstract void print();
}
